class Ship extends egret.Shape {
    
    public constructor(radius:number=40, color:number=0xFF0000) {
        super()
        
        this.draw()
    }

    public draw(showFlame:boolean=false) {
        this.graphics.clear()
        this.graphics.lineStyle(1, 0xffffff)
        this.graphics.moveTo(10, 0)
        this.graphics.lineTo(-10, 10)
        this.graphics.lineTo(-5, 0)
        this.graphics.lineTo(-10, -10)
        this.graphics.lineTo(10, 0)

        if (showFlame) {
            this.graphics.moveTo(-7.5, -5)
            this.graphics.lineTo(-15, 0)
            this.graphics.lineTo(-7.5, 5)
        }
    }
}